package com.dq.repository.user;


import com.dq.domain.org.Org;
import com.dq.domain.sys.section.SysSection;
import com.dq.domain.sys.user.user.OrgUser;
import com.dq.domain.sys.user.user.base.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liuhui
 * @date 2019/11/22 0022 14:56:02
 */
@Repository
public interface OrgUserRepository extends JpaRepository<OrgUser,Long> {

    OrgUser findByDeletedFalseAndMobile(String mobile);

    OrgUser findByUsernameAndStatus(String username, SysUser.Status status);
    OrgUser findByUsername(String username);
    OrgUser findBySectionAndDeletedFalse(Org org);

    List<OrgUser> findByDeletedAndSection(Boolean delete, SysSection org);

}
